#include <iostream>
#include <sys/types.h>
#include <sys/signal.h>

using namespace std;

int main(int argc, char *argv[])
{
    if(argc != 3)
    {
        cout << "error" << endl;
        return 1;
    }

    int signum = stoi(argv[1]);
    pid_t target = stoi(argv[2]);

    int n = kill(target, signum);
    if(n == 0)
    {
        cout << "send " << signum << " to " << target << "success" << endl;
    }
    else
    {
        cout << "send " << signum << " to " << target << "failed" << endl;        
    }

    return 0;
}